from openpyxl import Workbook
#expense_list = [['浙商银行', '6223097910010453369', '安成信', 98, '安成信', '18334789236', 1], ['浙商银行', '6223093010020088570', '安文', 101, '安文', '18120586909', 1]]

def write(expense_list):
    outwb = Workbook()
    outws = outwb.create_sheet(index=0)
    index = 0
    # 循环
    for expense_one in expense_list:
        index +=1
        outws.cell(index, 1).value = expense_one[0]
        outws.cell(index, 2).value = expense_one[1]
        outws.cell(index, 3).value = expense_one[2]
        outws.cell(index, 4).value = expense_one[3]
        outws.cell(index, 5).value = expense_one[4]
        outws.cell(index, 6).value = expense_one[5]
        outws.cell(index, 7).value = expense_one[6]

    # 保存
    outwb.save('demo.xlsx')


